const openDownFile=function (url,saveName) {
  if (typeof url==='object'&& url instanceof Blob){
    url=window.URL.createObjectURL(url);
  }
  const aLink=document.createElement('a')
  aLink.href=url;
  aLink.download=saveName
  aLink.click()
}
export default {
  saveExcel:(data,saveName)=>{
    const blob=new Blob([data],{ type: 'application/vnd.ms-excel;charset=utf-8'})
    openDownFile(blob,`${saveName}.xls`)
  }
}
